package router

import (
	"github.com/gin-gonic/gin"
	"go_es/server/api"
)

type BaseRouter struct{}

func (s *BaseRouter) InitBaseRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
	baseRouter := Router.Group("base")
	initRouter := Router.Group("init")
	dbApi := api.ApiGroupApp.DBApi
	baseApi := api.ApiGroupApp.BaseApi
	{
		baseRouter.POST("register", baseApi.Register)
		//baseRouter.POST("captcha", baseApi.Captcha)
		baseRouter.POST("login", baseApi.Login)
	}
	{
		initRouter.POST("initdb", dbApi.InitDB)
	}
	return baseRouter
}